home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / SecalDemo / Inc / exec / semaphores.inc < prev    next >
Encoding:
Text File  |  1997-06-11  |  568 b   |  35 lines

  1. include "inc/exec/nodes.inc";
  2. include "inc/exec/lists.inc";
  3. include "inc/exec/ports.inc";
  4. include "inc/exec/tasks.inc";
  5.  
  6. struct SemaphoreRequest is
  7.   sr_Link:MinNode;
  8.   sr_Waiter:ulong;
  9. ;
  10.  
  11. struct SignalSemaphore is
  12.   ss_Link:Node;
  13.   ss_NestCount:word;
  14.   ss_WaitQueue:MinList;
  15.   ss_MultipleLink:SemaphoreRequest;
  16.   ss_Owner:ulong;
  17.   ss_QueueCount:word;
  18. ;
  19.  
  20. struct SemaphoreMessage is
  21.   ssm_Message:Message;
  22.   ssm_Semaphore:ulong;
  23. ;
  24.  
  25. def SM_SHARED = (1);
  26. def SM_EXCLUSIVE = (0);
  27.  
  28. struct Semaphore is
  29.   sm_MsgPort:MsgPort;
  30.   sm_Bids:word;
  31. ;
  32.  
  33. def sm_LockMsg = mp_SigTask;
  34.  
  35.